import Vue from 'vue';
import * as types from '../mutation-type'


export default {
  state: {
    auth: {
      check() {
        return this.id != null && this.id != 0;
      },
      access_token: JSON.parse(localStorage.getItem(AUTH_ACCESS_TOKEN)),
      id: parseInt(localStorage.getItem(AUTH_USER_ID), 10) || 0,
      user: JSON.parse(localStorage.getItem(AUTH_USER))
    }，
    login: {
        success: false,
        failure: null
    },
    register: {
        success: false,
        failure: null
    }
  },
  mutations: {
    [types.ACCOUNT_AUTH_STATUS_CHANGED]() {

    }
  },
  actions: {

  }
}
